Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 1 - Appearance Manager Reference / Appearance Manager Functions
Drawing Appearance-Compliant Menus /


GetThemeMenuBarHeight

NEW WITH THE APPEARANCE MANAGER

Gets the optimal height of a menu bar for the current theme.

pascal OSStatus GetThemeMenuBarHeight (SInt16 *outHeight);
outHeight
On output, the height (in pixels) of the menu bar.
function result
A result code; see "Result Codes".
DISCUSSION
Call the GetThemeMenuBarHeight function if you are implementing a custom menu bar definition function and want to correctly calculate the height of a menu bar for the current theme. GetThemeMenuBarHeight will provide the ideal height of a menu bar in the current theme and for this reason should be used instead of the GetMBarHeight function, which provides only the actual menu bar height. GetMBarHeight can provide misleading information if, for example, the menu bar is hidden; in that case GetMBarHeight would return 0 for the menu bar's height, while GetThemeMenuBarHeight would return the preferred height of the menu bar, whether or not it was currently drawn.

SPECIAL CONSIDERATIONS
Make sure Appearance Manager 1.0.1 is present before calling the GetThemeMenuBarHeight function. See "Appearance Manager Gestalt Selector Constants" for details on how to determine if the Appearance Manager is present and what its version is, if so.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998